package com.itheima.java.ai.langchin4j.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 症状自评实体类
 * 
 * @author xiaozhi
 * @since 2025-01-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("symptom_assessments")
public class SymptomAssessment {

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 评估标题
     */
    @TableField("title")
    private String title;

    /**
     * 主要症状描述
     */
    @TableField("main_symptoms")
    private String mainSymptoms;

    /**
     * 症状持续时间
     */
    @TableField("duration")
    private String duration;

    /**
     * 疼痛等级 (1-10)
     */
    @TableField("pain_level")
    private Integer painLevel;

    /**
     * 伴随症状 (JSON格式存储)
     */
    @TableField("accompanying_symptoms")
    private String accompanyingSymptoms;

    /**
     * 诱发因素
     */
    @TableField("trigger_factors")
    private String triggerFactors;

    /**
     * 缓解因素
     */
    @TableField("relief_factors")
    private String reliefFactors;

    /**
     * 既往类似症状
     */
    @TableField("previous_episodes")
    private String previousEpisodes;

    /**
     * 当前用药情况
     */
    @TableField("current_medications")
    private String currentMedications;

    /**
     * AI分析结果
     */
    @TableField("ai_analysis")
    private String aiAnalysis;

    /**
     * 风险等级 (LOW, MEDIUM, HIGH, URGENT)
     */
    @TableField("risk_level")
    private String riskLevel;

    /**
     * 建议就诊科室
     */
    @TableField("recommended_department")
    private String recommendedDepartment;

    /**
     * 紧急程度 (1-5)
     */
    @TableField("urgency_score")
    private Integer urgencyScore;

    /**
     * 评估状态 (PENDING, COMPLETED, REVIEWED)
     */
    @TableField("status")
    private String status;

    /**
     * 医生审核意见
     */
    @TableField("doctor_review")
    private String doctorReview;

    /**
     * 审核医生ID
     */
    @TableField("reviewed_by")
    private Long reviewedBy;

    /**
     * 审核时间
     */
    @TableField("reviewed_at")
    private LocalDateTime reviewedAt;

    /**
     * 创建时间
     */
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    /**
     * 逻辑删除标志
     */
    @TableLogic
    @TableField("deleted")
    private Boolean deleted;

    // 手动添加getter方法
    public Long getId() {
        return id;
    }

    public Long getUserId() {
        return userId;
    }

    public String getTitle() {
        return title;
    }

    public String getMainSymptoms() {
        return mainSymptoms;
    }

    public String getDuration() {
        return duration;
    }

    public Integer getPainLevel() {
        return painLevel;
    }

    public String getAccompanyingSymptoms() {
        return accompanyingSymptoms;
    }

    public String getTriggerFactors() {
        return triggerFactors;
    }

    public String getReliefFactors() {
        return reliefFactors;
    }

    public String getPreviousEpisodes() {
        return previousEpisodes;
    }

    public String getCurrentMedications() {
        return currentMedications;
    }

    public String getAiAnalysis() {
        return aiAnalysis;
    }

    public String getRiskLevel() {
        return riskLevel;
    }

    public String getRecommendedDepartment() {
        return recommendedDepartment;
    }

    public Integer getUrgencyScore() {
        return urgencyScore;
    }

    public String getStatus() {
        return status;
    }

    public String getDoctorReview() {
        return doctorReview;
    }

    public Long getReviewedBy() {
        return reviewedBy;
    }

    public LocalDateTime getReviewedAt() {
        return reviewedAt;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }

    public Boolean getDeleted() {
        return deleted;
    }

    // 手动添加setter方法
    public void setId(Long id) {
        this.id = id;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public void setMainSymptoms(String mainSymptoms) {
        this.mainSymptoms = mainSymptoms;
    }

    public void setDuration(String duration) {
        this.duration = duration;
    }

    public void setPainLevel(Integer painLevel) {
        this.painLevel = painLevel;
    }

    public void setAccompanyingSymptoms(String accompanyingSymptoms) {
        this.accompanyingSymptoms = accompanyingSymptoms;
    }

    public void setTriggerFactors(String triggerFactors) {
        this.triggerFactors = triggerFactors;
    }

    public void setReliefFactors(String reliefFactors) {
        this.reliefFactors = reliefFactors;
    }

    public void setPreviousEpisodes(String previousEpisodes) {
        this.previousEpisodes = previousEpisodes;
    }

    public void setCurrentMedications(String currentMedications) {
        this.currentMedications = currentMedications;
    }

    public void setAiAnalysis(String aiAnalysis) {
        this.aiAnalysis = aiAnalysis;
    }

    public void setRiskLevel(String riskLevel) {
        this.riskLevel = riskLevel;
    }

    public void setRecommendedDepartment(String recommendedDepartment) {
        this.recommendedDepartment = recommendedDepartment;
    }

    public void setUrgencyScore(Integer urgencyScore) {
        this.urgencyScore = urgencyScore;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public void setDoctorReview(String doctorReview) {
        this.doctorReview = doctorReview;
    }

    public void setReviewedBy(Long reviewedBy) {
        this.reviewedBy = reviewedBy;
    }

    public void setReviewedAt(LocalDateTime reviewedAt) {
        this.reviewedAt = reviewedAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }

    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }
}